import {
	apiMixUrlApi
} from "@/api/assemb.js";
/**
 * 分享得会员
 * @param {string} userid
 */
function manageAppletsShare(userid) {
	console.log(userid, "userid========1");
	bindUser(userid);
}

/**
 * 分享赚钱
 * @param {string} userid
 */
function bindUser(userid, type) {
	var prams = {
		bindUserid: userid,
	};
	apiMixUrlApi(prams, "1052", "BindUser").then((json) => {
		console.log("1052", json);
		if (!type) {
			wx.showModal({
				title: "提示",
				content: json.descinfo == "success" ? "助力成功" : json.descinfo,
				showCancel: false,
				success(res) {},
			});
		}
	});
}

export {
	manageAppletsShare,
	bindUser
};